﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace MyFirstWpfApp
{
    /// <summary>
    /// Interaction logic for Docking.xaml
    /// </summary>
    public partial class Docking : Window
    {
        private Random rand;

        public Docking()
        {
            InitializeComponent();

            rand = new Random();
        }

        private void button1_Click(object sender, RoutedEventArgs e)
        {
            for (int i = 0; i < 10; i++)
            {
                int wrap = rand.Next(0, 4);
                Ellipse ell = new Ellipse();
                SolidColorBrush br = new SolidColorBrush(Colors.Red);
                ell.Width = 10;
                ell.Height = 10;
                ell.Stroke = br;
                ell.Fill = br;

                switch (wrap)
                {
                    case 0: this.one.Children.Add(ell);
                        break;
                    case 1: this.two.Children.Add(ell);
                        break;
                    case 2: this.three.Children.Add(ell);
                        break;
                    case 3: this.four.Children.Add(ell);
                        break;
                }
            }
        }
    }
}
